# Request

<div class="api-docs__separator" data-reactroot="">

---

</div><div class="api-docs__import" data-reactroot="">

```ts
import { Request } from "@hyper-fetch/core";
```

</div><div class="api-docs__section">

## Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Fetch request it is designed to prepare the necessary setup to execute the request to the server. We can set up basic
options for example endpoint, method, headers and advanced settings like cache, invalidation patterns, concurrency,
retries and much, much more. :::info Usage We should not use this class directly in the standard development flow. We
can initialize it using the `createRequest` method on the **Client** class. :::

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:40](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L40)

</p><div class="api-docs__section">

## Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="client"><td class="api-docs__param-name required">
### client

`Required`

</td><td class="api-docs__param-type">

`Client<GlobalError, Adapter>`

</td></tr><tr param-data="requestOptions"><td class="api-docs__param-name required">

### requestOptions

`Required`

</td><td class="api-docs__param-type">

`RequestOptionsType<Endpoint, ExtractAdapterOptionsType<Adapter>, ExtractAdapterMethodType<Adapter>>`

</td></tr><tr param-data="requestJSON"><td class="api-docs__param-name optional">

### requestJSON

`Optional`

</td><td class="api-docs__param-type">

`RequestCurrentType<Payload, QueryParams, Endpoint, ExtractAdapterOptionsType<Adapter>, ExtractAdapterMethodType<Adapter>>`

</td></tr></tbody></table></div><div class="api-docs__section">

## Properties

</div><div class="api-docs__properties"><div class="api-docs__property" property-data="abortKey"><h3 class="api-docs__name">

### `abortKey`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:68](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L68)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
string;
```

</div><hr/></div><div class="api-docs__property" property-data="auth"><h3 class="api-docs__name">

### `auth`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:54](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L54)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean;
```

</div><hr/></div><div class="api-docs__property" property-data="cache"><h3 class="api-docs__name">

### `cache`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:64](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L64)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean;
```

</div><hr/></div><div class="api-docs__property" property-data="cacheKey"><h3 class="api-docs__name">

### `cacheKey`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:69](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L69)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
string;
```

</div><hr/></div><div class="api-docs__property" property-data="cacheTime"><h3 class="api-docs__name">

### `cacheTime`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:65](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L65)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
number;
```

</div><hr/></div><div class="api-docs__property" property-data="cancelable"><h3 class="api-docs__name">

### `cancelable`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:60](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L60)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean;
```

</div><hr/></div><div class="api-docs__property" property-data="client"><h3 class="api-docs__name">

### `client`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:91](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L91)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
Client<GlobalError, Adapter>;
```

</div><hr/></div><div class="api-docs__property" property-data="data"><h3 class="api-docs__name">

### `data`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:57](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L57)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
Payload;
```

</div><hr/></div><div class="api-docs__property" property-data="deduplicate"><h3 class="api-docs__name">

### `deduplicate`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:73](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L73)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean;
```

</div><hr/></div><div class="api-docs__property" property-data="deduplicateTime"><h3 class="api-docs__name">

### `deduplicateTime`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:74](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L74)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
number;
```

</div><hr/></div><div class="api-docs__property" property-data="effectKey"><h3 class="api-docs__name">

### `effectKey`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:71](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L71)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
string;
```

</div><hr/></div><div class="api-docs__property" property-data="endpoint"><h3 class="api-docs__name">

### `endpoint`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:52](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L52)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
Endpoint;
```

</div><hr/></div><div class="api-docs__property" property-data="garbageCollection"><h3 class="api-docs__name">

### `garbageCollection`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:63](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L63)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
number;
```

</div><hr/></div><div class="api-docs__property" property-data="headers"><h3 class="api-docs__name">

### `headers`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:53](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L53)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
HeadersInit;
```

</div><hr/></div><div class="api-docs__property" property-data="method"><h3 class="api-docs__name">

### `method`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:55](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L55)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ExtractAdapterMethodType<Adapter>;
```

</div><hr/></div><div class="api-docs__property" property-data="mock"><h3 class="api-docs__name">

### `mock`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:76](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L76)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
Generator<
  GeneratorReturnMockTypes<
    Response,
    Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>
  >,
  GeneratorReturnMockTypes<
    Response,
    Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>
  >,
  GeneratorReturnMockTypes<
    Response,
    Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>
  >
>;
```

</div><hr/></div><div class="api-docs__property" property-data="mockData"><h3 class="api-docs__name">

### `mockData`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:81](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L81)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
RequestDataMockTypes<
  Response,
  Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>
>;
```

</div><hr/></div><div class="api-docs__property" property-data="offline"><h3 class="api-docs__name">

### `offline`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:67](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L67)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean;
```

</div><hr/></div><div class="api-docs__property" property-data="options"><h3 class="api-docs__name">

### `options`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:59](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L59)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ExtractAdapterOptionsType<Adapter>;
```

</div><hr/></div><div class="api-docs__property" property-data="params"><h3 class="api-docs__name">

### `params`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:56](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L56)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
ExtractRouteParams<Endpoint>;
```

</div><hr/></div><div class="api-docs__property" property-data="queryParams"><h3 class="api-docs__name">

### `queryParams`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:58](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L58)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
QueryParams;
```

</div><hr/></div><div class="api-docs__property" property-data="queueKey"><h3 class="api-docs__name">

### `queueKey`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:70](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L70)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
string;
```

</div><hr/></div><div class="api-docs__property" property-data="queued"><h3 class="api-docs__name">

### `queued`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:66](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L66)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean;
```

</div><hr/></div><div class="api-docs__property" property-data="requestJSON"><h3 class="api-docs__name">

### `requestJSON`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:97](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L97)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
RequestCurrentType<
  Payload,
  QueryParams,
  Endpoint,
  ExtractAdapterOptionsType<Adapter>,
  ExtractAdapterMethodType<Adapter>
>;
```

</div><hr/></div><div class="api-docs__property" property-data="requestOptions"><h3 class="api-docs__name">

### `requestOptions`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:92](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L92)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
RequestOptionsType<Endpoint, ExtractAdapterOptionsType<Adapter>, ExtractAdapterMethodType<Adapter>>;
```

</div><hr/></div><div class="api-docs__property" property-data="retry"><h3 class="api-docs__name">

### `retry`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:61](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L61)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
number;
```

</div><hr/></div><div class="api-docs__property" property-data="retryTime"><h3 class="api-docs__name">

### `retryTime`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:62](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L62)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
number;
```

</div><hr/></div><div class="api-docs__property" property-data="used"><h3 class="api-docs__name">

### `used`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:72](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L72)

</p><div class="api-docs__section">

#### Type

</div><div class="api-docs__property-type">

```ts
boolean;
```

</div><hr/></div></div><div class="api-docs__section">

## Methods

</div><div class="api-docs__methods"><div class="api-docs__method" method-data="dataMapper"><h3 class="api-docs__name">

### `dataMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:75](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L75)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(data: Payload) => NewDataType;
```

</div><hr/></div><div class="api-docs__method" method-data="exec"><h3 class="api-docs__name">

### `exec()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method to use the request WITHOUT adding it to cache and queues. This mean it will make simple request without queue
side effects.

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:462](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L462)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

</div><hr/></div><div class="api-docs__method" method-data="requestMapper"><h3 class="api-docs__name">

### `requestMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:82](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L82)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(request: Request, requestId: string) => NewRequest | Promise<NewRequest>;
```

</div><hr/></div><div class="api-docs__method" method-data="responseMapper"><h3 class="api-docs__name">

### `responseMapper()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:83](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L83)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
(response: ResponseReturnType<ExtractResponseType<Request>, ExtractErrorType<Request>, ExtractAdapterType<Request>>) =>
  ResponseReturnType<NewResponse, NewError, ExtractAdapterType<Request>> |
  Promise<ResponseReturnType<NewResponse, NewError, ExtractAdapterType<Request>>>;
```

</div><hr/></div><div class="api-docs__method" method-data="send"><h3 class="api-docs__name">

### `send()`

</h3><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Method used to perform requests with usage of cache and queues

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:493](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L493)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

</div><hr/></div><div class="api-docs__method" method-data="abort"><h3 class="api-docs__name">

### `abort()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
abort();
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:446](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L446)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="clone"><h3 class="api-docs__name">

### `clone()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
clone<D, P, Q>(options);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:401](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L401)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead>
<tr><th>Name</th><th>Details</th></tr>
</thead><tbody>
<tr param-data="options"><td class="api-docs__param-name optional">

#### options

`Optional`

</td><td class="api-docs__param-type">

`RequestCurrentType<Payload, QueryParams, Endpoint, ExtractAdapterOptionsType<Adapter>, ExtractAdapterMethodType<Adapter>>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, D, P, Q>;
```

</div><hr/></div><div class="api-docs__method" method-data="removeMock"><h3 class="api-docs__name">

### `removeMock()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
removeMock();
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:291](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L291)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
this;
```

</div><hr/></div><div class="api-docs__method" method-data="setAbortKey"><h3 class="api-docs__name">

### `setAbortKey()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setAbortKey(abortKey);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:235](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L235)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="abortKey"><td class="api-docs__param-name required">

#### abortKey

`Required`

</td><td class="api-docs__param-type">

`string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setAuth"><h3 class="api-docs__name">

### `setAuth()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setAuth(auth);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:163](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L163)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="auth"><td class="api-docs__param-name required">

#### auth

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setCache"><h3 class="api-docs__name">

### `setCache()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setCache(cache);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:215](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L215)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="cache"><td class="api-docs__param-name required">

#### cache

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setCacheKey"><h3 class="api-docs__name">

### `setCacheKey()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setCacheKey(cacheKey);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:240](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L240)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="cacheKey"><td class="api-docs__param-name required">

#### cacheKey

`Required`

</td><td class="api-docs__param-type">

`string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setCacheTime"><h3 class="api-docs__name">

### `setCacheTime()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setCacheTime(cacheTime);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:221](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L221)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="cacheTime"><td class="api-docs__param-name required">

#### cacheTime

`Required`

</td><td class="api-docs__param-type">

`number`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setCancelable"><h3 class="api-docs__name">

### `setCancelable()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setCancelable(cancelable);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:185](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L185)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="cancelable"><td class="api-docs__param-name required">

#### cancelable

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setData"><h3 class="api-docs__name">

### `setData()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setData<D>(data);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:171](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L171)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="data"><td class="api-docs__param-name required">

#### data

`Required`

</td><td class="api-docs__param-type">

`D`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<
  Response,
  Payload,
  QueryParams,
  GlobalError,
  LocalError,
  Endpoint,
  Adapter,
  D extends null ? false : true,
  HasParams,
  HasQuery
>;
```

</div><hr/></div><div class="api-docs__method" method-data="setDataMapper"><h3 class="api-docs__name">

### `setDataMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setDataMapper<DataMapper>(dataMapper);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Map data before it gets send to the server

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:306](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L306)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="dataMapper"><td class="api-docs__param-name required">

#### dataMapper

`Required`

</td><td class="api-docs__param-type">

`DataMapper`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setDeduplicate"><h3 class="api-docs__name">

### `setDeduplicate()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setDeduplicate(deduplicate);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:255](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L255)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="deduplicate"><td class="api-docs__param-name required">

#### deduplicate

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setDeduplicateTime"><h3 class="api-docs__name">

### `setDeduplicateTime()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setDeduplicateTime(deduplicateTime);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:259](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L259)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="deduplicateTime"><td class="api-docs__param-name required">

#### deduplicateTime

`Required`

</td><td class="api-docs__param-type">

`number`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setEffectKey"><h3 class="api-docs__name">

### `setEffectKey()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setEffectKey(effectKey);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:250](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L250)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="effectKey"><td class="api-docs__param-name required">

#### effectKey

`Required`

</td><td class="api-docs__param-type">

`string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setGarbageCollection"><h3 class="api-docs__name">

### `setGarbageCollection()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setGarbageCollection(garbageCollection);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:205](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L205)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="garbageCollection"><td class="api-docs__param-name required">

#### garbageCollection

`Required`

</td><td class="api-docs__param-type">

`number`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setHeaders"><h3 class="api-docs__name">

### `setHeaders()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setHeaders(headers);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:159](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L159)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="headers"><td class="api-docs__param-name required">

#### headers

`Required`

</td><td class="api-docs__param-type">

`HeadersInit`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setMock"><h3 class="api-docs__name">

### `setMock()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setMock(mockData);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:271](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L271)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="mockData"><td class="api-docs__param-name required">

#### mockData

`Required`

</td><td class="api-docs__param-type">

`RequestDataMockTypes<Response, this>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
this;
```

</div><hr/></div><div class="api-docs__method" method-data="setOffline"><h3 class="api-docs__name">

### `setOffline()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setOffline(offline);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:267](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L267)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="offline"><td class="api-docs__param-name required">

#### offline

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setOptions"><h3 class="api-docs__name">

### `setOptions()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setOptions(options);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:181](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L181)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="options"><td class="api-docs__param-name required">

#### options

`Required`

</td><td class="api-docs__param-type">

`ExtractAdapterOptionsType<Adapter>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, true>;
```

</div><hr/></div><div class="api-docs__method" method-data="setParams"><h3 class="api-docs__name">

### `setParams()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setParams<P>(params);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:167](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L167)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="params"><td class="api-docs__param-name required">

#### params

`Required`

</td><td class="api-docs__param-type">

`P`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<
  Response,
  Payload,
  QueryParams,
  GlobalError,
  LocalError,
  Endpoint,
  Adapter,
  HasData,
  P extends null ? false : true,
  HasQuery
>;
```

</div><hr/></div><div class="api-docs__method" method-data="setQueryParams"><h3 class="api-docs__name">

### `setQueryParams()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setQueryParams(queryParams);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:177](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L177)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="queryParams"><td class="api-docs__param-name required">

#### queryParams

`Required`

</td><td class="api-docs__param-type">

`QueryParams`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, true>;
```

</div><hr/></div><div class="api-docs__method" method-data="setQueueKey"><h3 class="api-docs__name">

### `setQueueKey()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setQueueKey(queueKey);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:245](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L245)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="queueKey"><td class="api-docs__param-name required">

#### queueKey

`Required`

</td><td class="api-docs__param-type">

`string`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setQueued"><h3 class="api-docs__name">

### `setQueued()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setQueued(queued);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:231](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L231)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="queued"><td class="api-docs__param-name required">

#### queued

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setRequestMapper"><h3 class="api-docs__name">

### `setRequestMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setRequestMapper<NewRequest>(requestMapper);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Map request before it gets send to the server

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:319](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L319)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="requestMapper"><td class="api-docs__param-name required">

#### requestMapper

`Required`

</td><td class="api-docs__param-type">

mapper of the request

`RequestMapper<this, NewRequest>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setResponseMapper"><h3 class="api-docs__name">

### `setResponseMapper()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setResponseMapper<NewResponse, NewError>(responseMapper);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

Map the response to the new interface

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:332](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L332)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="responseMapper"><td class="api-docs__param-name optional">

#### responseMapper

`Optional`

</td><td class="api-docs__param-type">

our mapping callback

`ResponseMapper<this, NewResponse, NewError>`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<NewResponse, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setRetry"><h3 class="api-docs__name">

### `setRetry()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setRetry(retry);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:189](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L189)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="retry"><td class="api-docs__param-name required">

#### retry

`Required`

</td><td class="api-docs__param-type">

`number`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setRetryTime"><h3 class="api-docs__name">

### `setRetryTime()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setRetryTime(retryTime);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:195](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L195)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="retryTime"><td class="api-docs__param-name required">

#### retryTime

`Required`

</td><td class="api-docs__param-type">

`number`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="setUsed"><h3 class="api-docs__name">

### `setUsed()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
setUsed(used);
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:263](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L263)

</p><div class="api-docs__section">

#### Parameters

</div>
<div class="api-docs__parameters">
<table>
<thead><tr><th>Name</th><th>Details</th></tr></thead>
<tbody><tr param-data="used"><td class="api-docs__param-name required">

#### used

`Required`

</td><td class="api-docs__param-type">

`boolean`

</td></tr></tbody></table></div><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
Request<Response, Payload, QueryParams, GlobalError, LocalError, Endpoint, Adapter, HasData, HasParams, HasQuery>;
```

</div><hr/></div><div class="api-docs__method" method-data="toJSON"><h3 class="api-docs__name">

### `toJSON()`

</h3><div class="api-docs__section">

#### Preview

</div><div class="api-docs__preview fn">

```ts
toJSON();
```

</div><div class="api-docs__section">

#### Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">

</span></div><p class="api-docs__definition">

Defined in
[request/request.ts:366](https://github.com/BetterTyped/hyper-fetch/blob/c3e2c45/packages/core/src/request/request.ts#L366)

</p><div class="api-docs__section">

#### Return

</div><div class="api-docs__returns">

```ts
{
  abortKey: string;
  auth: boolean;
  cache: boolean;
  cacheKey: string;
  cacheTime: number;
  cancelable: boolean;
  data: Payload | null | undefined;
  deduplicate: boolean;
  deduplicateTime: number;
  disableRequestInterceptors: boolean | undefined;
  disableResponseInterceptors: boolean | undefined;
  effectKey: string;
  endpoint: string;
  garbageCollection: number;
  headers: HeadersInit;
  method: T extends AdapterType<any, infer M, any, any, any> ? M : never;
  offline: boolean;
  options: AdapterOptions | T extends AdapterType<infer O, any, any, any, any> ? O : never;
  params: Params | null | undefined;
  queryParams: QueryParams | null | undefined;
  queueKey: string;
  queued: boolean;
  requestOptions: {
    abortKey: string;
    auth: boolean;
    cache: boolean;
    cacheKey: string;
    cacheTime: number;
    cancelable: boolean;
    deduplicate: boolean;
    deduplicateTime: number;
    disableRequestInterceptors: boolean;
    disableResponseInterceptors: boolean;
    effectKey: string;
    endpoint: GenericEndpoint;
    garbageCollection: number;
    headers: HeadersInit;
    method: RequestMethods;
    offline: boolean;
    options: AdapterOptions;
    queueKey: string;
    queued: boolean;
    retry: number;
    retryTime: number;
  };
  retry: number;
  retryTime: number;
  updatedAbortKey: boolean;
  updatedCacheKey: boolean;
  updatedEffectKey: boolean;
  updatedQueueKey: boolean;
  used: boolean;
}
```

</div><hr/></div></div>
